package com.moyq5.mvcmaker;

/**
 * web模块（或者子项目）信息
 * @author Moyq5
 * @date 2018年8月24日
 */
public class WebModule extends AbstractModule {
	/**
	 * 模块json配置目录所在包名
	 */
	private String jacksonPackage;
	/**
	 * 模块json序列化（serialize）过虑器所在包名，过虑器用于控制json结构
	 */
	private String jacksonFilterPackage;
	/**
	 * 模块json序列化（serialize）混合器所在包名，混合器用于控制属性值转换
	 */
	private String jacksonMixinPackage;
	/**
	 * 模块Controller层所在包名
	 */
	private String controllerPackage;
	/**
	 * 模块表单参数对象所在包名，表单参数对象用于接收和校验请求参数
	 */
	private String formPackage;
	
	/**
	 * 构建模块信息
	 * @param modulePath 模块名称
	 * @param modulePackage 模块包名
	 */
	public WebModule(Project pj, String moduleName, String modulePackage) {
		super(pj, moduleName, modulePackage);
		String pk = getFullPackage();
		jacksonPackage = pk + ".jackson";
		jacksonFilterPackage = pk + ".jackson.filter";
		jacksonMixinPackage = pk + ".jackson.mixin";
		controllerPackage = pk + ".controller";
		formPackage = pk + ".form";
	}

	public String getJacksonPackage() {
		return jacksonPackage;
	}

	public void setJacksonPackage(String jacksonPackage) {
		this.jacksonPackage = jacksonPackage;
	}

	public String getJacksonFilterPackage() {
		return jacksonFilterPackage;
	}

	public void setJacksonFilterPackage(String jacksonFilterPackage) {
		this.jacksonFilterPackage = jacksonFilterPackage;
	}

	public String getJacksonMixinPackage() {
		return jacksonMixinPackage;
	}

	public void setJacksonMixinPackage(String jacksonMixinPackage) {
		this.jacksonMixinPackage = jacksonMixinPackage;
	}

	public String getControllerPackage() {
		return controllerPackage;
	}

	public void setControllerPackage(String controllerPackage) {
		this.controllerPackage = controllerPackage;
	}

	public String getFormPackage() {
		return formPackage;
	}

	public void setFormPackage(String formPackage) {
		this.formPackage = formPackage;
	}

}
